# -*- coding:utf-8 -*-

from com.mat.rpa.utils.globalConstants import GlobalConstants
from com.mat.rpa.views.workWindow.leftPanel.directiveTree import treeItem
from . import desktopWindowConstants

class DesktopWindowSubDirectiveTree(treeItem.TreeItemWithID):
    def __init__(self, parent):
        super(DesktopWindowSubDirectiveTree, self).__init__(parent)
        self.createDesktopWindowTreeNode()

    def createDesktopWindowTreeNode(self):
        self.nodeType = GlobalConstants.treeBranchType
        self.directiveType = "desktopWindowOperation"
        self.setText(0,"桌面窗口操作")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, desktopWindowConstants.DesktopWindowConstants.gettingWindowObjectDirective, "获取窗口对象(Win)")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, desktopWindowConstants.DesktopWindowConstants.gettingWindowInfoDirective, "获取窗口信息(Win)")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, desktopWindowConstants.DesktopWindowConstants.activatingSoftwareWindowDirective,
                            "激活软件窗口(Win)")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, desktopWindowConstants.DesktopWindowConstants.settingWindowStatusDirective,
                            "设置窗口状态(Win)")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, desktopWindowConstants.DesktopWindowConstants.settingWindowVisibleOrNotDirective,
                            "设置窗口是否显示(Win)")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, desktopWindowConstants.DesktopWindowConstants.movingWindowPositionDirective,
                            "移动窗口位置(Win)")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, desktopWindowConstants.DesktopWindowConstants.adjustingWindowSizeDirective,
                            "调整窗口大小(Win)")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, desktopWindowConstants.DesktopWindowConstants.closingSoftwareWindowDirective,
                            "关闭软件窗口(Win)")